﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using T.Common.Domain.Common;

namespace RedDragon.Common.Domain.Purchase
{
    /// <summary>
    /// 付款计划行
    /// </summary>
    public class Payments : BaseEntity
    {
        /// <summary>
        /// 行号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//IsPrimaryKey 主键 IsIdentity 自增
        public int PaymentId { get; set; }

        /// <summary>
        /// 付款计划时间
        /// </summary>
        public DateTime? ScheduleTime { get; set; }

        /// <summary>
        /// 付款比例
        /// </summary>
        public decimal PaymentRatio { get; set; }

        /// <summary>
        /// 付款金额
        /// </summary>
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 预付款
        /// </summary>
        public decimal Advance { get; set; }

        /// <summary>
        /// 开票金额
        /// </summary>
        public decimal InvoiceAmount { get; set; }

        /// <summary>
        /// 已付款金额
        /// </summary>
        public decimal AmountPaid { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(100)")]//设置长度
        public string Remark { get; set; }

        /// <summary>
        /// 订单编码(外键 采购/委外)
        /// </summary>
        [SugarColumn(ColumnDataType = "NVarchar(200)")]//设置长度
        public string PurchaseNumber { get; set; }
    }
}
